# -*- coding:utf-8 -*-

from com.mat.rpa.utils.globalConstants import GlobalConstants
from com.mat.rpa.views.workWindow.leftPanel.directiveTree import treeItem
from . import desktopDataExtractionConstants

class DesktopDataExtractionSubDirectiveTree(treeItem.TreeItemWithID):
    def __init__(self, parent):
        super(DesktopDataExtractionSubDirectiveTree, self).__init__(parent)
        self.createDesktopDataExtractionTreeNode()

    def createDesktopDataExtractionTreeNode(self):
        self.nodeType = GlobalConstants.treeBranchType
        self.directiveType = "desktopDataExtraction"
        self.setText(0,"桌面数据提取")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, desktopDataExtractionConstants.DesktopDataExtractionConstants.winElementSnapshotDirective, "元素截图(Win)")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, desktopDataExtractionConstants.DesktopDataExtractionConstants.gettingWinElementInfoDirective, "获取元素信息(Win)")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, desktopDataExtractionConstants.DesktopDataExtractionConstants.gettingWinElementPositionDirective,
                            "获取元素位置(Win)")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, desktopDataExtractionConstants.DesktopDataExtractionConstants.gettingOptionOfWinComboboxDirective,
                            "获取下拉框选项(Win)")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, desktopDataExtractionConstants.DesktopDataExtractionConstants.gettingWindowInfoDirective,
                            "获取窗口信息(Win)")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, desktopDataExtractionConstants.DesktopDataExtractionConstants.gettingSelectedWinTextDirective,
                            "获取选中文本(Win)")